<html>
	<head>
		<title>Xem danh sach</title>
	</head>
	<body>
		<table border = "1">
			<tr>
				<th>STT</th>
				<th>Ten dang nhap</th>
				<th>Mat khau</th>
				<th>Ho ten</th>
				<th>Gioi tinh</th>
				<th>Ngay sinh</th>
				<th>Dia chi</th>
			</tr>
		<?php
			$connection = mysql_connect("localhost", "root", "12345");
			mysql_select_db("dangnhap", $connection);
			$sql = "select * from dangnhap";
			$result = mysql_query($sql, $connection);
			mysql_close($connection);
			$stt = 0;
			while($row = mysql_fetch_array($result))
			{
				$tendangnhap = $row["TenDangNhap"];
				$matkhau = $row["MatKhau"];
				$hoten = $row["HoTen"];
				$gioitinh = $row["GioiTinh"];
				$ngaysinh = $row["NgaySinh"];
				$diachi = $row["DiaChi"];
				$stt++;
		?>
		
			<tr>
				<td>
					<?php
						echo $stt;
					?>
				</td>
				<td>
					<?php
						echo $tendangnhap;
					?>
				</td>
				<td>
					<?php
						echo $matkhau;
					?>
				</td>
				<td>
					<?php
						echo $hoten;
					?>
				</td>
				<td>
					<?php
						if($gioitinh == 1)
							echo ("Nam");
						else
							echo ("Nu");
					?>
				</td>
				<td>
					<?php
						echo $ngaysinh;
					?>
				</td>
				<td>
					<?php
						echo $diachi;
					?>
				</td>
			</tr>
		
		<?php
			}//ket thuc while
		?>
		</table>
	</body>
</html>